<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<html>
<head>
  <title>职位管理</title>
<style>
.viewcompany .content-module.first {
  border-top: none;
}
.viewcompany .content-module {
  border-top: 1px solid #DDD;
  clear: both;
  font-size: 13px;
  overflow: hidden;
  padding: 20px 10px;
}
</style>
<script>
  $(document).ready(function() {
  });
</script>
</head>

<body>
  <c:if test="${not empty message}">
      <div id="message" class="alert alert-success"><button data-dismiss="alert" class="close">×</button>${message}</div>
  </c:if>
  <div class="row">
    <div class="span8 viewcompany">
      <div class="row well">
        <div class="span6">
          <div>
            <div>${company.name}</div>
          </div>
        </div>
        <div class="span1">
          <img src="${ctx}/static/images/company/${company.avatar.imagePath}"/>
        </div>
      </div>
      <div class="row content-module first">
        <div class="span8">
          <div><strong>公司行业：</strong>${company.industry.name}</div>
          <div><strong>公司性质：</strong>${company.typeName}</div>
          <div><strong>公司规模：</strong>${company.sizeName}</div>
          <div><strong>公司简介：</strong>${company.introduction}</div>
        </div>
      </div>
      <div class="row content-module">
        <div class="span8">
          <div><strong>招聘中的职位</strong></div>
          <table class="table table-striped">
            <tr><th>职位名称</th><th>工作地点</th><th>发布日期</th><th>截止日期</th><th>招聘人数</th></tr>
            <c:forEach items="${positions.content}" var="position">
            <tr>
              <td><a href="${ctx}/jobsearch/position/${position.id}">${position.name}</a></td>
              <td>${position.provinceName} - ${position.cityName}</td>
              <td><fmt:formatDate value="${position.refreshDate}" type="date"/></td>
              <td><fmt:formatDate value="${position.closeDate}" type="date"/></td>
              <td>${position.count}</td>
            </tr>
            </c:forEach>
          </table>
          <tags:pagination page="${positions}" paginationSize="20"/>
        </div>
      </div>
    </div>
  </div>
  <div>
    
    <form id="inputForm" action="${ctx}/member/bookmark/save/company" method="post">
      <input type="hidden" name="cid" value="${company.id}"/>
      <button id="apply" type="submit">收藏公司</button>
    </form>
  </div>
</body>
</html>
